KISSY.add("tbc/doctor/0.2.0/index",["node","base","./index.css"],function(t,e){var r=e("node"),o=e("base");e("./index.css");var i=r.all,a=t.UA,n=t.Anim,s=6048e5,c="tb_doctor_last",d="doctor:browser:update",h="doctor:screen:zoom",l="doctor:screen:reset",u=i("body"),v=window,f=o.extend({initializer:function(){function t(t){var r=i(t),o=i(".tb-doctor-contents",c);o.append(r),e.binding(),e.show()}var e=this,r=e.getLast(),o=this.get("interval"),n=+new Date-parseInt(r,10)>o,s=e.get("template"),c=i(s);if(e.set("el",c),!r||n)if(e.detectUpdate()){u.fire(d);var v='<p>\u60a8\u7684\u6d4f\u89c8\u5668\u56e0\u7248\u672c\u8fc7\u4f4e\u53ef\u80fd\u5b58\u5728\u5b89\u5168\u9690\u60a3\uff0c\u8bf7<a target="_blank" href="http://wap.uc.cn/index.php?action=PackageDown&do=ByPfid&product=UCBrowser&pfid=101&lang=zh-cn&bid=999&direct=true&from=tb-doctor" class="tb-doctor-highlight">\u70b9\u51fb\u4e0b\u8f7dUC\u6d4f\u89c8\u5668</a>\u6216\u8005<a target="_blank" href="http://www.microsoft.com/china/windows/IE/upgrade/index.aspx" class="tb-doctor-highlight" >\u5347\u7ea7IE\u6d4f\u89c8\u5668</a></p>';t(v)}else if(e.detectZoom()){u.fire(h);var v='<p>\u60a8\u6240\u8bbf\u95ee\u7684\u7f51\u9875\u5185\u5bb9\u88ab\u7f29\u653e\u53ef\u80fd\u5f71\u54cd\u6b63\u5e38\u4f7f\u7528\uff0c\u53ef\u4ee5\u4f7f\u7528\u952e\u76d8\u5feb\u6377\u952e <span class="tb-doctor-highlight">'+("macintosh"==a.os?"\u2318":"Ctrl")+'</span> \u548c <span class="tb-doctor-highlight">0</span> \u6062\u590d\u6b63\u5e38\u3002</p>';t(v),i(document).on("keydown",function(t){48!==t.keyCode&&96!==t.keyCode||!("macintosh"===a.os&&t.metaKey&&!t.ctrlKey||"macintosh"!==a.os&&t.ctrlKey)||(e.hide(),u.fire(l))})}this.set("created",!0)},destructor:function(){this.$el.remove(),this.set("created",!1),this.$el=null,this.el=null},binding:function(){var t=this;t.$el.delegate("click",".tb-doctor-close",function(e){return e.preventDefault(),t.setLast(),t.hide()})},show:function(){var t=this.$el;t.appendTo("body"),t.show();var e=new n(t,{height:45},.3,"easeOut");return e.run()},hide:function(){var t=this.$el,e=new n(t,{height:0},.3,"easeOut");return e.run()},initIEUserData:function(){if(!this.initedIEUserData){var t=i('<div style="behavior:url(#default#userData);"></div>');t.appendTo("body");var e=t[0];this.set("storageEl",e),this.initedIEUserData=!0}return this.get("storageEl")},setLast:function(){return this.setStore(c,+new Date)},getLast:function(){return this.getStore(c)},getStore:function(t){var e=this;try{if(window.localStorage)return localStorage[t];var r=e.initIEUserData();return r.load("TaoBaoDoctor"),r.getAttribute(t)}catch(o){}},setStore:function(t,e){var r=this;try{if(!window.localStorage){var o=r.initIEUserData();return o.setAttribute(t,e),o.save("TaoBaoDoctor")}localStorage[t]=e}catch(i){}},detectUpdate:function(){return a.ie&&a.ie<8&&-1==navigator.userAgent.indexOf("TaoBrowser")},detectZoom:function(){function t(t,e){var r=Math.pow(10,e);return Math.round(t*r)/r}var e=1,r=v.devicePixelRatio;return r&&1>r&&r>0?(e=r,f.dpr=r):isNaN(screen.deviceXDPI)||isNaN(screen.logicalXDPI)?v.outerWidth>0&&v.innerWidth>0&&(f.outerWidth=v.outerWidth,f.innerWidth=v.innerWidth,e=v.outerWidth/v.innerWidth):e=screen.deviceXDPI/screen.logicalXDPI,f.zoom=e,1!==t(e,1)}},{ATTRS:{el:{setter:function(t){this.$el=t,this.el=t[0]}},template:{value:'<div class="tb-doctor">                    <div class="tb-doctor-contents">                    <a href="javascript:;" class="tb-doctor-close">\u5173\u95ed</a></div></div>'},interval:{value:s},check:{value:["zoom","update"]}}});return v.Doctor=f,f});